{extend name="public:base"/}


{block name="title"}网站设置{/block}

{block name="style"}

{/block}

{block name="main"}

<section class="content" xmlns="http://www.w3.org/1999/html">
    <div class="row">

        <div class="col-md-12">

            <div class="row">
                <div class="col-lg-12">
                    <div class="box">
                        <div class="box-header with-border">
                            <h3 class="box-title">网站设置</h3>
                        </div>

                        <form  id="pt_form" action="<?=url('admin/System/handle')?>" method="post">
                            <input type="hidden" name="inc_type" value="<?=$inc_type?>">
                            <div class="box-body">

                                <div class="nav-tabs-custom">
                                    <ul class="nav nav-tabs">
                                        <?php foreach($group_list as $k=>$v){?>
                                        <li class="<?=$inc_type==$k?'active':''?>"><a href="<?=url('admin/System/index',['inc_type'=>$k])->suffix(false)?>"><?=$v?></a></li>
                                        <?php } ?>
                                    </ul>
                                </div>

                                <div class="clearfix"></div>


                                <div class="form-group ">
                                    <div class='col-sm-2 text-right'>
                                        <label for="hot_search" class="control-label Validform_label" >热门搜索</label>
                                    </div>
                                    <div class='col-sm-10'>

                                        <textarea id="hot_search" style="height:200px;" class="form-control" name="hot_search" datatype="*" placeholder="请输入热门搜索" errormsg="热门搜索超出长度范围">{$config.hot_search}</textarea>
                                        <div class="help-block">一行代表一个可选值(注意换行)</div>
                                    </div>
                                </div>


                                <div class="form-group ">
                                    <div class='col-sm-2 text-right'>
                                        <label for="goods_search" class="control-label Validform_label" >产品默认搜索</label>
                                    </div>
                                    <div class='col-sm-10'>
                                        <input type="text" id="goods_search" class="form-control" name="goods_search" placeholder="请输入产品默认搜索" datatype="*"  value="{$config.goods_search}" errormsg="产品默认搜索超出长度范围">
                                        <div class="help-block"></div>
                                    </div>
                                </div>

                                <div class="form-group ">
                                    <div class='col-sm-2 text-right'>
                                        <label for="shop_search" class="control-label Validform_label" >店铺默认搜索</label>
                                    </div>
                                    <div class='col-sm-10'>
                                        <input type="text" id="shop_search" class="form-control" name="shop_search" placeholder="请输入店铺默认搜索" datatype="*"  value="{$config.shop_search}" errormsg="店铺默认搜索超出长度范围">
                                        <div class="help-block"></div>
                                    </div>
                                </div>


                            </div>
                            <div class="box-footer text-center">
                                <button class="btn btn-primary" type="submit">保存</button>
                                <span class="btn btn-white" onclick="history.go(-1)">返回</span>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>
{/block}

{block name="js"}

<script>

    /*
    var validate = validator('#pt_form');

    validate.config({
        ajaxPost:false,
    });
    */
    $("#pt_form").Validform({
        tiptype: function(msg,o,cssctl){
            if(o.type == 3){
                toastr.error(msg);
                return false;
            }
        },
        tipSweep:true, //是否失去焦点就验证
        postonce:true, //表单只提交一次
    });


</script>
{/block}